翻訳と辞書
Words near each other
・ "O" Is for Outlaw
・ "O"-Jung.Ban.Hap.
・ "Ode-to-Napoleon" hexachord
・ "Oh Yeah!" Live
・ "Our Contemporary" regional art exhibition (Leningrad, 1975)
・ "P" Is for Peril
・ "Pimpernel" Smith
・ "Polish death camp" controversy
・ "Pro knigi" ("About books")
・ "Prosopa" Greek Television Awards
・ "Pussy Cats" Starring the Walkmen
・ "Q" Is for Quarry
・ "R" Is for Ricochet
・ "R" The King (2016 film)
・ "Rags" Ragland
・ ! (album)
・ ! (disambiguation)
・ !!
・ !!!
・ !!! (album)
・ !!Destroy-Oh-Boy!!
・ !Action Pact!
・ !Arriba! La Pachanga
・ !Hero
・ !Hero (album)
・ !Kung language
・ !Oka Tokat
・ !PAUS3
・ !T.O.O.H.!
・ !Women Art Revolution


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

simple precedence parser : ウィキペディア英語版
simple precedence parser
In computer science, a simple precedence parser is a type of bottom-up parser for context-free grammars that can be used only by simple precedence grammars.
The implementation of the parser is quite similar to the generic bottom-up parser. A stack is used to store a viable prefix of a sentential form from a rightmost derivation. Symbols \lessdot, \dot = and \gtrdot are used to identify the pivot, and to know when to Shift or when to Reduce.
==Implementation==

* Compute the Wirth–Weber precedence relationship table.
* Start with a stack with only the starting marker $.
* Start with the string being parsed (Input) ended with an ending marker $.
* While not (Stack equals to $S and Input equals to $) (S = Initial symbol of the grammar)
*
* Search in the table the relationship between Top(stack) and NextToken(Input)
*
* if the relationship is \dot = or \lessdot
*
*
* Shift:
*
*
* Push(Stack, relationship)
*
*
* Push(Stack, NextToken(Input))
*
*
* RemoveNextToken(Input)
*
* if the relationship is \gtrdot
*
*
* Reduce:
*
*
* SearchProductionToReduce(Stack)
*
*
* RemovePivot(Stack)
*
*
* Search in the table the relationship between the Non terminal from the production and first symbol in the stack (Starting from top)
*
*
* Push(Stack, relationship)
*
*
* Push(Stack, Non terminal)
SearchProductionToReduce (Stack)
* search the Pivot in the stack the nearest \lessdot from the top
* search in the productions of the grammar which one have the same right side than the Pivot

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「simple precedence parser」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.